package com.online.onlineshop.services;

import com.online.onlineshop.vo.CartValueObject;

import java.util.List;

public interface ForCartService {

    /**
     * @param uid
     * @param cids
     * @return 勾选商品的数据
     */
    List<CartValueObject> findbycids(Integer uid, String cids);


    /**
     * 添加商品到购物车的方法
     *
     * @param uid      用户id
     * @param pid      商品id
     * @param amount   商品总价
     * @param userName 用户名
     */
    Integer putToCart(Integer uid, Integer pid, Integer amount, String userName);

    /*
     * 获取已经加入到购物车中的商品信息
     * */
    List<CartValueObject> getCartVOByUid(Integer Uid);

    Integer deleteByCid(int cid);

    Integer deleteByCids(Integer[] cid);

    Integer addNum(Integer cid, Integer uid, String userName);

    Integer subNum(Integer cid, Integer uid, String userName);

}
